/**
 * @file src/datatypes/Tuple.java
 */
package datatypes;

/**
 * Defines a tuple structure,
 * needed by other classes to associate objects
 * 
 * @param <T> First associated class to associate
 * @param <U> Second associated class to associate
 */
public class Tuple<T, U>
{
    /** First element */
    public T first;
    
    /** Second element */
    public U second;
    
    /** Hide default constructor */
    @SuppressWarnings("unused")
    private Tuple()
    {}

    /**
     *  Constructor
     *  
     *  @param a First associated object
     *  @param b Second associated object
     */
    public Tuple(T a, U b)
    {
        first = a;
        second = b;
    }
    
    /**
     * Override toString()
     *
     * @return String representation of a tuple
     */
    public String toString()
    {
        return "(" + first.toString() + ", " + second.toString() + ")";
    }


} // class Tuple